#! /bin/bash

# This script is executed after the instance has booted up and
# before the user's shell is spawned.

# Manage your daemons with supervisor
# /usr/bin/supervisord -s -c /etc/supervisor/supervisord.conf
# Read more: https://www.digitalocean.com/community/tutorials/how-to-install-and-manage-supervisor-on-ubuntu-and-debian-vps

# Or start all your daemons quickly like this:
# Example:
# nohup sleep 31337 &>/dev/null &
#
# Bash supervisor hack (restart on exit every 10 seconds):
supervise() {
    (exec -a "[supervise] $1" bash -c "while :; do $*; sleep 10; done &>/dev/null" &)
}
# supervise my-daemon 31337
# Restart: killall my-daemon
# Stop   : killall -g my-daemon
#
# Or start them the System-V way:
# service nginx start
# service postgresql start
# service pagekite start

